<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="cn.edu.cqvie.ssm.entity.Product" %>
<%@ page import="cn.edu.cqvie.ssm.dao.ProductDao" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
	ProductDao dao = new ProductDao();
	List<Product> products = dao.getProduct();
	request.setAttribute("products", products);
%>
<html>
<head>
<meta charset="UTF-8">
<title>所有商品信息列表</title>
</head>
<body>
	<table  border="1">
		<thead>
			<tr>
				<th>商品名称</th>
				<th>商品产地</th>
				<th>商品价格</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="product" items="${products}">
				<tr>
					<td align="center">${product.name}</td>
					<td align="center">${product.area}</td>
					<td align="center">${product.price}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</body>
</html>